#ifndef __UM_RINGBUFFER_H__
#define __UM_RINGBUFFER_H__

#include "um_basic_types.h"

typedef struct 
{
	UM_S32 (*write)(UM_VOID *p, UM_U8 *data, UM_S32 datalen);
	UM_S32 (*read)(UM_VOID *p, UM_U8 *data, UM_S32 datalen);
	UM_S32 (*getSize)(UM_VOID *p);
	UM_S32 (*getLength)(UM_VOID *p);
	UM_S32 (*rest)(UM_VOID *p);
	UM_S32 (*read0)(UM_VOID *p, UM_U8 *data, UM_S32 datalen);
	UM_S32 (*complete)(UM_VOID *p);
}RingBuffer;

RingBuffer * createRingBuffer(UM_S32 len);
UM_VOID destoryRingBuffer(RingBuffer * p);

#endif